home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-05-30 | 7.6 KB | 199 lines | [????/????] |
-
-
-
- NOWEB(1) NOWEB(1)
-
-
- NNAAMMEE
- noweb - a simple literate-programming tool
-
- SSYYNNOOPPSSIISS
- nnoowweebb [--tt] [--oo] [--LL_f_o_r_m_a_t] [--mmaarrkkuupp _p_a_r_s_e_r] [file] ...
-
- DDEESSCCRRIIPPTTIIOONN
- _N_o_w_e_b is a literate-programming tool like _F_u_n_n_e_l_W_E_B or
- _n_u_w_e_b_, only simpler. A _n_o_w_e_b file contains program source
- code interleaved with documentation. When _n_o_w_e_b is
- invoked, it writes the program source code to the output
- files mentioned in the noweb file, and it writes a _T_e_X
- file for typeset documentation.
-
- For more flexibility, consider _n_o_t_a_n_g_l_e_(_1_) and _n_o_w_e_a_v_e_(_1_)_.
-
- FFOORRMMAATT OOFF NNOOWWEEBB FFIILLEESS
- A _n_o_w_e_b file is a sequence of _c_h_u_n_k_s_, which may appear in
- any order. A chunk may contain code or documentation.
- Documentation chunks begin with a line that starts with an
- at sign (@) followed by a space or newline. They have no
- names. Code chunks begin with
- <<_c_h_u_n_k _n_a_m_e>>=
- on a line by itself. The double left angle bracket (<<)
- must be in the first column. Chunks are terminated by the
- beginning of another chunk, or by end of file. If the
- first line in the file does not mark the beginning of a
- chunk, it is assumed to be the first line of a documenta-
- tion chunk.
-
- Documentation chunks contain text that is copied verbatim
- to the _T_e_X file (except for quoted code). _n_o_w_e_b works
- with _L_a_T_e_X; the first documentation chunk must contain a
- _L_a_T_e_X \\ddooccuummeennttssttyyllee command with the nnoowweebb document-style
- option. It must also contain a _L_a_T_e_X \\bbeeggiinn{{ddooccuummeenntt}}
- command.
-
- Code chunks contain program source code and references to
- other code chunks. Several code chunks may have the same
- name; _n_o_w_e_b concatenates their definitions to produce a
- single chunk, just as other literate-programming tools do.
- _n_o_w_e_b looks for chunks that are defined but not used in
- the source file. If the name of such a chunk contains no
- spaces, the chunk is an ``output file;'' _n_o_w_e_b expands it
- and writes the result onto the file of the same name. A
- code-chunk definition is like a macro definition; it con-
- tains references to other chunks, which are themselves
- expanded, and so on. _n_o_w_e_b's output is readable; it pre-
- serves the indentation of expanded chunks with respect to
- the chunks in which they appear.
-
- If a star (**) is appended to the name of an output file,
- _n_o_w_e_b includes line-number information as specified by the
- --LL_f_o_r_m_a_t option (or for C if no --LL_f_o_r_m_a_t option is given).
-
-
-
- local 4/19/93 1
-
-
-
-
-
- NOWEB(1) NOWEB(1)
-
-
- The name itself may not contain shell metacharacters.
-
- Code may be quoted within documentation chunks by placing
- double square brackets ([[[[_._._.]]]]) around it. These double
- square brackets are used to give the code special typo-
- graphic treatment in the _T_e_X file. If quoted code ends
- with three or more square brackets, _n_o_w_e_b chooses the
- rightmost pair, so that, for example, [[[[aa[[ii]]]]]] is parsed
- correctly.
-
- If double left and right angle brackets are not paired,
- they are treated as literal <<<< and >>>>. Users can force
- any such brackets, even paired brackets, to be treated as
- literal by using a preceding at sign (e.g. @@<<<<).
-
- Any line beginning with `@@ ' terminates a code chunk, but
- if the line has the form
- @@ %%ddeeff _i_d_e_n_t_i_f_i_e_r_s
- it is taken to mean that the preceding chunk defines the
- identifiers listed in _i_d_e_n_t_i_f_i_e_r_s_. This list contains
- identifiers separated by whitespace; any sequence of non-
- white characters may be an identifier. _n_o_w_e_b uses a sim-
- ple heuristic to avoid recognizing identifiers that are
- substrings of other identifiers.
-
- OOPPTTIIOONNSS
- --tt Suppress generation of a _T_e_X file.
-
- --oo Suppress generation of output files.
-
- --LL_f_o_r_m_a_t
- Use _f_o_r_m_a_t to format line-number information for
- starred output files. (If the option is omitted, a
- format suitable for C is used.) _f_o_r_m_a_t is as
- defined by _n_o_t_a_n_g_l_e_(_1_)_;
-
- --mmaarrkkuupp _p_a_r_s_e_r
- Use _p_a_r_s_e_r to parse the input file. Enables use of
- noweb tools on files in other formats; for example,
- the nnuummaarrkkuupp parser understands _n_u_w_e_b_(_1_) format.
- See _n_o_w_e_b_f_i_l_t_e_r_s_(_1_) for more information. For
- experts only.
-
- BBUUGGSS
- Ignoring unused chunks whose names contain spaces some-
- times causes problems, especially in the case when a chunk
- has multiple definitions and one is misspelled; the mis-
- spelled definition will be silently ignored. _n_o_r_o_o_t_s_(_1_)
- can be used as a sanity checker to catch this sort of mis-
- take.
-
- _n_o_w_e_b requires the new version of _a_w_k_, assumed to be
- called _n_a_w_k_. DEC _n_a_w_k has a bug in that that causes prob-
- lems with braces in _T_e_X output. GNU _g_a_w_k is reported to
-
-
-
- local 4/19/93 2
-
-
-
-
-
- NOWEB(1) NOWEB(1)
-
-
- work.
-
- The default _L_a_T_e_X pagestyles don't set the width of the
- boxes containing headers and footers. Since _n_o_w_e_b code
- paragraphs are extra wide, this _L_a_T_e_X bug sometimes
- results in extra-wide headers and footers. The remedy is
- to redefine the relevant ppss@@** commands; ppss@@nnoowweebb in
- nnoowweebb..ssttyy can be used as an example.
-
- SSEEEE AALLSSOO
- _n_o_t_a_n_g_l_e_(_1_)_, _n_o_w_e_a_v_e_(_1_)_, _n_o_r_o_o_t_s_(_1_)_, _n_o_u_n_t_a_n_g_l_e_(_1_)_, _n_o_w_e_b_-
- _s_t_y_l_e_(_1_)_, _n_o_w_e_b_f_i_l_t_e_r_s_(_1_)_, _n_u_w_e_b_2_n_o_w_e_b_(_1_)
- Norman Ramsey, _L_i_t_e_r_a_t_e _p_r_o_g_r_a_m_m_i_n_g _s_i_m_p_l_i_f_i_e_d_, _I_E_E_E _S_o_f_t_-
- _w_a_r_e 11(5):97-105, September 1994.
-
- AAUUTTHHOORR
- Norman Ramsey, Bellcore. Internet address nnoorr--
- mmaann@@bbeellllccoorree..ccoomm.
- Noweb home page at
- ffttpp::////bbeellllccoorree..ccoomm//ppuubb//nnoorrmmaann//wwwwww//nnoowweebb//iinnttrroo..hhttmmll.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- local 4/19/93 3
-
-
-